package datastructures.list.doublylist;

/**
 * @author hck
 */
public class TestDoublyLinkedList {
    public static void main(String[] args) {
        DoublyLinkedList<Integer> doublyLinkedList = new DoublyLinkedList<>();

        doublyLinkedList.add(1);
        doublyLinkedList.add(2);
        doublyLinkedList.add(3);
        doublyLinkedList.add(4);
        doublyLinkedList.add(5);
        doublyLinkedList.add(6);
        doublyLinkedList.add(7);

        doublyLinkedList.print();

        System.out.println("get node 3 : " + doublyLinkedList.get(3));
        System.out.println("remove node 4 : " + doublyLinkedList.remove(4));
        doublyLinkedList.print();
        System.out.println("remove node 0 : " +doublyLinkedList.remove(0));
        doublyLinkedList.print();
        System.out.println("remove node 4 : " +doublyLinkedList.remove(4));
        doublyLinkedList.print();
    }
}
